import Foundation

struct Resolution {
    var width = 0
    var heith = 0
    var isRetina: Bool?
}

class VideoMode {
    var resolution = Resolution(isRetina: true)
    var interlaced = false
    var frameRate = 0.0
    var name: String?
}

public func classAndStructDemo() {
    let someResolution = Resolution()
    let resolution = Resolution(width: 1920, heith: 1080, isRetina: true)
}

// MARK: - 结构体的成员逐一构造器
/// 1. 所有结构体都会有一个自动生成的成员逐一构造器
///


// MARK: - 恒等运算符
/// 由于类是引用类型, 所以多个常量变量可能在幕后同时引用一个类实例 ===





